package fr.utbm.gl52.smartgrid.model.storage;

import java.util.Map;
import java.util.TreeMap;

import fr.utbm.gl52.smartgrid.util.properties.Properties;
import fr.utbm.gl52.smartgrid.util.properties.PropertyDouble;

public class Capacity extends Storage {

	private double C;

	public Capacity() {
		super();
	}

	public Capacity(String name, double power, double current, double voltage,
			double efficiency, double pwMin, double pwMax, double socMin,
			double socMax, double dynamicMin, double dynamicMax, double SOC,
			double dynamic, long lifetime, double eTotStock, StorageType stype) {
		super(name, power, current, voltage, efficiency, pwMin, pwMax, socMin,
				socMax, dynamicMin, dynamicMax, SOC, dynamic, lifetime,
				eTotStock, stype);
		// TODO Auto-generated constructor stub
	}

	public double getC() {
		return this.C;
	}

	public void setC(double c) {
		this.C = c;
	}

	public void setProperties(Map<String, Properties<?>> map) {
		this.C = (Double) map.remove(Messages.getString("Capacity.0")).getValue(); //$NON-NLS-1$
	}

	public Map<String, Properties<?>> getProperties() {
		TreeMap<String, Properties<?>> prop = (TreeMap<String, Properties<?>>) super
				.getProperties();
		PropertyDouble p0 = new PropertyDouble(
				Messages.getString("Capacity.0"), this.C, false); //$NON-NLS-1$
		prop.put(p0.getName(), p0);
		return prop;
	}
}
